<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="https://cdn.bootcss.com/socket.io/2.2.0/socket.io.dev.js"></script>
  <title>Document</title>
</head>

<body>
  <script>
    var socket = io.connect('ws://localhost:3001');
    socket.on('show', (data) => {
      console.log(data)
    });
    socket.emit("Msg", "返回数据")
  </script>
</body>

</html>